<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>standard_library - RDoc Documentation</title>


<script src="./js/navigation.js" defer></script>
<script src="./js/search.js" defer></script>
<script src="./js/search_index.js" defer></script>
<script src="./js/searcher.js" defer></script>
<script src="./js/darkfish.js" defer></script>

<script src="./js/jquery-3.2.0.min.js"></script>

<script src="./js/vue.min.js"></script>
<script src="./js/js.cookie.min.js"></script>

<link href="./css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="./css/rdoc.css" rel="stylesheet">
<link href="./css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "./";
  var index_rel_prefix = "./";
  var darkModeCsseHref = "./css/rdoc-dm.css"
  var defaultModeCssHref = "./css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="file">
  <!-- this is page.html -->
  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0-preview2 NOT FOUND -->
  </div> <!-- end action bar -->


 <div class='wrapper hdiv'>

 


<nav id='vapp' role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="./index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="./table_of_contents.html#pages">Pages</a>
    <a href="./table_of_contents.html#classes">Classes</a>
    <a href="./table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  
<div class="nav-section">
  <h3>Table of Contents</h3>

  <ul class="link-list" role="directory">
    <li><a href="#label-Ruby+Standard+Library">Ruby Standard Library</a>
    <li><a href="#label-Libraries">Libraries</a>
    <li><a href="#label-Extensions">Extensions</a>
    <li><a href="#label-Default+gems">Default gems</a>
    <li><a href="#label-Libraries">Libraries</a>
    <li><a href="#label-Extensions">Extensions</a>
    <li><a href="#label-Bundled+gems">Bundled gems</a>
    <li><a href="#label-Libraries">Libraries</a>
  </ul>
</div>

  <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>

  <div id="project-metadata">
   <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
    
<div id="fileindex-section" class="nav-section">
  <h3>Pages</h3>

  <ul class="link-list">
    <li><a href="./NEWS/NEWS-1_8_7.html">NEWS-1.8.7</a>
    <li><a href="./NEWS/NEWS-1_9_1.html">NEWS-1.9.1</a>
    <li><a href="./NEWS/NEWS-1_9_2.html">NEWS-1.9.2</a>
    <li><a href="./NEWS/NEWS-1_9_3.html">NEWS-1.9.3</a>
    <li><a href="./NEWS/NEWS-2_0_0.html">NEWS-2.0.0</a>
    <li><a href="./NEWS/NEWS-2_1_0.html">NEWS-2.1.0</a>
    <li><a href="./NEWS/NEWS-2_2_0.html">NEWS-2.2.0</a>
    <li><a href="./NEWS/NEWS-2_3_0.html">NEWS-2.3.0</a>
    <li><a href="./NEWS/NEWS-2_4_0.html">NEWS-2.4.0</a>
    <li><a href="./NEWS/NEWS-2_5_0.html">NEWS-2.5.0</a>
    <li><a href="./NEWS/NEWS-2_6_0.html">NEWS-2.6.0</a>
    <li><a href="./NEWS/NEWS-2_7_0.html">NEWS-2.7.0</a>
    <li><a href="./NEWS/NEWS-3_0_0_md.html">NEWS-3.0.0</a>
    <li><a href="./NEWS/NEWS-3_1_0_md.html">NEWS-3.1.0</a>
    <li><a href="./NEWS/NEWS-3_2_0_md.html">NEWS-3.2.0</a>
    <li><a href="./bsearch_rdoc.html">bsearch</a>
    <li><a href="./bug_triaging_rdoc.html">bug_triaging</a>
    <li><a href="./case_mapping_rdoc.html">case_mapping</a>
    <li><a href="./character_selectors_rdoc.html">character_selectors</a>
    <li><a href="./command_injection_rdoc.html">command_injection</a>
    <li><a href="./contributing_md.html">contributing</a>
    <li><a href="./contributing/building_ruby_md.html">building_ruby</a>
    <li><a href="./contributing/documentation_guide_md.html">documentation_guide</a>
    <li><a href="./contributing/glossary_md.html">glossary</a>
    <li><a href="./contributing/making_changes_to_ruby_md.html">making_changes_to_ruby</a>
    <li><a href="./contributing/making_changes_to_stdlibs_md.html">making_changes_to_stdlibs</a>
    <li><a href="./contributing/reporting_issues_md.html">reporting_issues</a>
    <li><a href="./contributing/testing_ruby_md.html">testing_ruby</a>
    <li><a href="./dig_methods_rdoc.html">dig_methods</a>
    <li><a href="./distribution_md.html">distribution</a>
    <li><a href="./dtrace_probes_rdoc.html">dtrace_probes</a>
    <li><a href="./encodings_rdoc.html">encodings</a>
    <li><a href="./extension_ja_rdoc.html">extension.ja</a>
    <li><a href="./extension_rdoc.html">extension</a>
    <li><a href="./fiber_md.html">fiber</a>
    <li><a href="./format_specifications_rdoc.html">format_specifications</a>
    <li><a href="./globals_rdoc.html">globals</a>
    <li><a href="./implicit_conversion_rdoc.html">implicit_conversion</a>
    <li><a href="./keywords_rdoc.html">keywords</a>
    <li><a href="./maintainers_md.html">maintainers</a>
    <li><a href="./marshal_rdoc.html">marshal</a>
    <li><a href="./memory_view_md.html">memory_view</a>
    <li><a href="./optparse/argument_converters_rdoc.html">argument_converters</a>
    <li><a href="./optparse/creates_option_rdoc.html">creates_option</a>
    <li><a href="./optparse/option_params_rdoc.html">option_params</a>
    <li><a href="./optparse/tutorial_rdoc.html">tutorial</a>
    <li><a href="./packed_data_rdoc.html">packed_data</a>
    <li><a href="./ractor_md.html">ractor</a>
    <li><a href="./regexp_rdoc.html">regexp</a>
    <li><a href="./regexp/methods_rdoc.html">methods</a>
    <li><a href="./regexp/unicode_properties_rdoc.html">unicode_properties</a>
    <li><a href="./ruby_3_3_0_preview2/COPYING.html">COPYING</a>
    <li><a href="./ruby_3_3_0_preview2/COPYING_ja.html">COPYING.ja</a>
    <li><a href="./ruby_3_3_0_preview2/LEGAL.html">LEGAL</a>
    <li><a href="./ruby_3_3_0_preview2/NEWS_md.html">NEWS</a>
    <li><a href="./ruby_3_3_0_preview2/README_ja_md.html">README.ja</a>
    <li><a href="./ruby_3_3_0_preview2/README_md.html">README</a>
    <li><a href="./security_rdoc.html">security</a>
    <li><a href="./signals_rdoc.html">signals</a>
    <li><a href="./standard_library_rdoc.html">standard_library</a>
    <li><a href="./strftime_formatting_rdoc.html">strftime_formatting</a>
    <li><a href="./syntax_rdoc.html">syntax</a>
    <li><a href="./syntax/assignment_rdoc.html">assignment</a>
    <li><a href="./syntax/calling_methods_rdoc.html">calling_methods</a>
    <li><a href="./syntax/comments_rdoc.html">comments</a>
    <li><a href="./syntax/control_expressions_rdoc.html">control_expressions</a>
    <li><a href="./syntax/exceptions_rdoc.html">exceptions</a>
    <li><a href="./syntax/literals_rdoc.html">literals</a>
    <li><a href="./syntax/methods_rdoc.html">methods</a>
    <li><a href="./syntax/miscellaneous_rdoc.html">miscellaneous</a>
    <li><a href="./syntax/modules_and_classes_rdoc.html">modules_and_classes</a>
    <li><a href="./syntax/pattern_matching_rdoc.html">pattern_matching</a>
    <li><a href="./syntax/precedence_rdoc.html">precedence</a>
    <li><a href="./syntax/refinements_rdoc.html">refinements</a>
    <li><a href="./timezones_rdoc.html">timezones</a>
    <li><a href="./windows_md.html">windows</a>
    <li><a href="./yjit/yjit_md.html">yjit</a>
    <li><a href="./yjit/yjit_hacking_md.html">yjit_hacking</a>
  </ul>
</div>

   </div>
  </div>
</nav>


<!--  carbon ads here -->

<div id='extraz'>
  <div class='adzbox-index'  >
   
  </div>
 </div>         


<main role="main" aria-label="Page standard_library.rdoc">

<h1 id="label-Ruby+Standard+Library">Ruby Standard Library<span><a href="#label-Ruby+Standard+Library">&para;</a> <a href="#top">&uarr;</a></span></h1>

<p>The Ruby Standard Library is a vast collection of classes and modules that you can require in your code for additional features.</p>

<p>Below is an overview of libraries and extensions followed by a brief description.</p>

<h2 id="label-Libraries">Libraries<span><a href="#label-Libraries">&para;</a> <a href="#top">&uarr;</a></span></h2>
<dl class="rdoc-list note-list"><dt>MakeMakefile
<dd>
<p><a href="Module.html"><code>Module</code></a> used to generate a Makefile for C extensions</p>
</dd><dt>RbConfig
<dd>
<p>Information of your configure and build of Ruby</p>
</dd><dt>Gem
<dd>
<p>Package management framework for Ruby</p>
</dd></dl>

<h2 id="label-Extensions">Extensions<span><a href="#label-Extensions">&para;</a> <a href="#top">&uarr;</a></span></h2>
<dl class="rdoc-list note-list"><dt>Coverage
<dd>
<p>Provides coverage measurement for Ruby</p>
</dd><dt>Monitor
<dd>
<p>Provides an object or module to use safely by more than one thread</p>
</dd><dt>objspace
<dd>
<p>Extends <a href="ObjectSpace.html"><code>ObjectSpace</code></a> module to add methods for internal statistics</p>
</dd><dt>PTY
<dd>
<p>Creates and manages pseudo terminals</p>
</dd><dt>Ripper
<dd>
<p>Provides an interface for parsing Ruby programs into S-expressions</p>
</dd><dt>Socket
<dd>
<p>Access underlying OS socket implementations</p>
</dd></dl>

<h1 id="label-Default+gems">Default gems<span><a href="#label-Default+gems">&para;</a> <a href="#top">&uarr;</a></span></h1>
<ul><li>
<p>default gems are shipped with Ruby releases and also available as rubygems.</p>
</li><li>
<p>default gems are not uninstallable from Ruby installation.</p>
</li><li>
<p>default gems can be updated used by rubygems.</p>

<pre>* e.g. `gem update json`</pre>
</li><li>
<p>default gems can be used with bundler environment like ‘unbundled_env`.</p>
</li><li>
<p>default gems can be used any version on Gemfile.</p>

<pre>* e.g. `gem &quot;json&quot;, &quot;&gt;= 2.6&quot;`</pre>
</li></ul>

<h2 id="label-Libraries">Libraries<span><a href="#label-Libraries">&para;</a> <a href="#top">&uarr;</a></span></h2>
<dl class="rdoc-list note-list"><dt>Abbrev
<dd>
<p>Calculates a set of unique abbreviations for a given set of strings</p>
</dd><dt>Base64
<dd>
<p>Support for encoding and decoding binary data using a Base64 representation</p>
</dd><dt>Benchmark
<dd>
<p>Provides methods to measure and report the time used to execute code</p>
</dd><dt>Bundler
<dd>
<p>Manage your Ruby application’s gem dependencies</p>
</dd><dt>CGI
<dd>
<p>Support for the Common Gateway Interface protocol</p>
</dd><dt>CSV
<dd>
<p>Provides an interface to read and write CSV files and data</p>
</dd><dt>Delegator
<dd>
<p>Provides three abilities to delegate method calls to an object</p>
</dd><dt>DidYouMean
<dd>
<p>“Did you mean?” experience in Ruby</p>
</dd><dt>DRb
<dd>
<p>Distributed object system for Ruby</p>
</dd><dt>English
<dd>
<p>Provides references to special global variables with less cryptic names</p>
</dd><dt>ERB
<dd>
<p>An easy to use but powerful templating system for Ruby</p>
</dd><dt>ErrorHighlight
<dd>
<p>Highlight error location in your code</p>
</dd><dt>FileUtils
<dd>
<p>Several file utility methods for copying, moving, removing, etc</p>
</dd><dt>Find
<dd>
<p>This module supports top-down traversal of a set of file paths</p>
</dd><dt>Forwardable
<dd>
<p>Provides delegation of specified methods to a designated object</p>
</dd><dt>GetoptLong
<dd>
<p>Parse command line options similar to the GNU C getopt_long()</p>
</dd><dt>IPAddr
<dd>
<p>Provides methods to manipulate IPv4 and IPv6 IP addresses</p>
</dd><dt>IRB
<dd>
<p>Interactive Ruby command-line tool for REPL (Read Eval Print Loop)</p>
</dd><dt>OptionParser
<dd>
<p>Ruby-oriented class for command-line option analysis</p>
</dd><dt>Logger
<dd>
<p>Provides a simple logging utility for outputting messages</p>
</dd><dt>Mutex_m
<dd>
<p>Mixin to extend objects to be handled like a Mutex</p>
</dd><dt>Net::HTTP
<dd>
<p>HTTP client api for Ruby</p>
</dd><dt>Observable
<dd>
<p>Provides a mechanism for publish/subscribe pattern in Ruby</p>
</dd><dt>Open3
<dd>
<p>Provides access to stdin, stdout and stderr when running other programs</p>
</dd><dt>OpenStruct
<dd>
<p><a href="Class.html"><code>Class</code></a> to build custom data structures, similar to a <a href="Hash.html"><code>Hash</code></a></p>
</dd><dt>OpenURI
<dd>
<p>An easy-to-use wrapper for Net::HTTP, Net::HTTPS and Net::FTP</p>
</dd><dt>PP
<dd>
<p>Provides a PrettyPrinter for Ruby objects</p>
</dd><dt>PrettyPrinter
<dd>
<p>Implements a pretty printing algorithm for readable structure</p>
</dd><dt>PStore
<dd>
<p>Implements a file based persistence mechanism based on a <a href="Hash.html"><code>Hash</code></a></p>
</dd><dt>Readline
<dd>
<p>Wrapper for Readline extencion and Reline</p>
</dd><dt>Reline
<dd>
<p>GNU Readline and Editline by pure Ruby implementation.</p>
</dd><dt>Resolv
<dd>
<p>Thread-aware DNS resolver library in Ruby</p>
</dd><dt>resolv-replace.rb
<dd>
<p>Replace Socket DNS with Resolv</p>
</dd><dt><a href="RDoc.html"><code>RDoc</code></a>
<dd>
<p>Produces HTML and command-line documentation for Ruby</p>
</dd><dt>Rinda
<dd>
<p>The Linda distributed computing paradigm in Ruby</p>
</dd><dt>SecureRandom
<dd>
<p>Interface for secure random number generator</p>
</dd><dt>Set
<dd>
<p>Provides a class to deal with collections of unordered, unique values</p>
</dd><dt>Shellwords
<dd>
<p>Manipulates strings with word parsing rules of UNIX Bourne shell</p>
</dd><dt>Singleton
<dd>
<p>Implementation of the Singleton pattern for Ruby</p>
</dd><dt>Tempfile
<dd>
<p>A utility class for managing temporary files</p>
</dd><dt><a href="Time.html"><code>Time</code></a>
<dd>
<p>Extends the <a href="Time.html"><code>Time</code></a> class with methods for parsing and conversion</p>
</dd><dt>Timeout
<dd>
<p>Auto-terminate potentially long-running operations in Ruby</p>
</dd><dt>tmpdir.rb
<dd>
<p>Extends the <a href="Dir.html"><code>Dir</code></a> class to manage the OS temporary file path</p>
</dd><dt>TSort
<dd>
<p>Topological sorting using Tarjan’s algorithm</p>
</dd><dt>un.rb
<dd>
<p>Utilities to replace common UNIX commands</p>
</dd><dt>URI
<dd>
<p>A Ruby module providing support for Uniform Resource Identifiers</p>
</dd><dt>YAML
<dd>
<p>Ruby client library for the Psych YAML implementation</p>
</dd><dt>WeakRef
<dd>
<p>Allows a referenced object to be garbage-collected</p>
</dd></dl>

<h2 id="label-Extensions">Extensions<span><a href="#label-Extensions">&para;</a> <a href="#top">&uarr;</a></span></h2>
<dl class="rdoc-list note-list"><dt>BigDecimal
<dd>
<p>Provides arbitrary-precision floating point decimal arithmetic</p>
</dd><dt>Date
<dd>
<p>A subclass of <a href="Object.html"><code>Object</code></a> includes <a href="Comparable.html"><code>Comparable</code></a> module for handling dates</p>
</dd><dt>DateTime
<dd>
<p>Subclass of Date to handling dates, hours, minutes, seconds, offsets</p>
</dd><dt>Digest
<dd>
<p>Provides a framework for message digest libraries</p>
</dd><dt>Etc
<dd>
<p>Provides access to information typically stored in UNIX /etc directory</p>
</dd><dt>Fcntl
<dd>
<p>Loads constants defined in the OS fcntl.h C header file</p>
</dd><dt>Fiddle
<dd>
<p>A libffi wrapper for Ruby</p>
</dd><dt><a href="IO.html"><code>IO</code></a>
<dd>
<p>Extensions for Ruby <a href="IO.html"><code>IO</code></a> class, including wait, nonblock and ::console</p>
</dd><dt>JSON
<dd>
<p>Implements Javascript <a href="Object.html"><code>Object</code></a> Notation for Ruby</p>
</dd><dt>NKF
<dd>
<p>Ruby extension for Network Kanji Filter</p>
</dd><dt>OpenSSL
<dd>
<p>Provides SSL, TLS and general purpose cryptography for Ruby</p>
</dd><dt>Pathname
<dd>
<p>Representation of the name of a file or directory on the filesystem</p>
</dd><dt>Psych
<dd>
<p>A YAML parser and emitter for Ruby</p>
</dd><dt>StringIO
<dd>
<p>Pseudo I/O on <a href="String.html"><code>String</code></a> objects</p>
</dd><dt>StringScanner
<dd>
<p>Provides lexical scanning operations on a <a href="String.html"><code>String</code></a></p>
</dd><dt>Syslog
<dd>
<p>Ruby interface for the POSIX system logging facility</p>
</dd><dt>WIN32OLE
<dd>
<p>Provides an interface for OLE Automation in Ruby</p>
</dd><dt>Zlib
<dd>
<p>Ruby interface for the zlib compression/decompression library</p>
</dd></dl>

<h1 id="label-Bundled+gems">Bundled gems<span><a href="#label-Bundled+gems">&para;</a> <a href="#top">&uarr;</a></span></h1>
<ul><li>
<p>bundled gems are shipped with Ruby releases and also available as rubygems.</p>
</li><li>
<p>bundled gems are same as normal gems like ‘rails`, `rack`.</p>

<pre>* They are only bundled with Ruby releases.
* They can be uninstallable from Ruby installation.
* They are needed to declare in Gemfile when use with bundler.</pre>
</li></ul>

<h2 id="label-Libraries">Libraries<span><a href="#label-Libraries">&para;</a> <a href="#top">&uarr;</a></span></h2>
<dl class="rdoc-list note-list"><dt>MiniTest
<dd>
<p>A test suite with TDD, BDD, mocking and benchmarking</p>
</dd><dt>PowerAssert
<dd>
<p>Power Assert for Ruby.</p>
</dd><dt>Rake
<dd>
<p>Ruby build program with capabilities similar to make</p>
</dd><dt>Test::Unit
<dd>
<p>A compatibility layer for MiniTest</p>
</dd><dt>REXML
<dd>
<p>An XML toolkit for Ruby</p>
</dd><dt>RSS
<dd>
<p>Family of libraries that support various formats of XML “feeds”</p>
</dd><dt>Net::FTP
<dd>
<p>Support for the <a href="File.html"><code>File</code></a> Transfer Protocol</p>
</dd><dt>Net::IMAP
<dd>
<p>Ruby client api for Internet Message Access Protocol</p>
</dd><dt>Net::POP3
<dd>
<p>Ruby client library for POP3</p>
</dd><dt>Net::SMTP
<dd>
<p>Simple Mail Transfer Protocol client library for Ruby</p>
</dd><dt>Matrix
<dd>
<p>Represents a mathematical matrix.</p>
</dd><dt>Prime
<dd>
<p>Prime numbers and factorization library</p>
</dd><dt>RBS
<dd>
<p>RBS is a language to describe the structure of Ruby programs</p>
</dd><dt>TypeProf
<dd>
<p>A type analysis tool for Ruby code based on abstract interpretation</p>
</dd><dt>DEBUGGER__
<dd>
<p>Debugging functionality for Ruby</p>
</dd><dt>Racc
<dd>
<p>A LALR(1) parser generator written in Ruby.</p>
</dd></dl>

</main>

</div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>. </p><p><a href="https://jamesbritt.bandcamp.com/">Hack your world.  Feed your head.  Live curious</a>.</p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

